+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
+Thu Feb 18 00:27:46 1999 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.c (gtk_widget_queue_clear_area): only translate widget
+ relative coordinates to window relative if the widget is not a toplevel
+ (i.e. it has ->parent != NULL), otherwise the area size gets screwed up
+ for toplevels.
+
Tue Feb 16 14:25:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* INSTALL
}
else
{
- gint wx, wy, wwidth, wheight;
- /* Translate widget relative to window-relative */
-
- gdk_window_get_position (widget->window, &wx, &wy);
- x -= wx - widget->allocation.x;
- y -= wy - widget->allocation.y;
-
- gdk_window_get_size (widget->window, &wwidth, &wheight);
-
- if (x < 0)
- {
- width += x; x = 0;
- }
- if (y < 0)
+ if (widget->parent)
{
- height += y; y = 0;
+ gint wx, wy, wwidth, wheight;
+ /* Translate widget relative to window-relative */
+
+ gdk_window_get_position (widget->window, &wx, &wy);
+ x -= wx - widget->allocation.x;
+ y -= wy - widget->allocation.y;
+
+ gdk_window_get_size (widget->window, &wwidth, &wheight);
+
+ if (x < 0)
+ {
+ width += x; x = 0;
+ }
+ if (y < 0)
+ {
+ height += y; y = 0;
+ }
+ if (x + width > wwidth)
+ width = wwidth - x;
+ if (y + height > wheight)
+ height = wheight - y;
}
- if (x + width > wwidth)
- width = wwidth - x;
- if (y + height > wheight)
- height = wheight - y;
gtk_widget_queue_draw_data (widget, x, y, width, height, NULL);
}